Assign Sampler to Task
Method: PATCH
/api/v1/task-requests/{id}/assign-sampler
Description
This endpoint assigns a sampler to a task request. It allows updating the task with sampler details, pickup address, due date, and priority.
🔑 Authentication
This endpoint requires authentication via headers.
| Param | Value | Type |
|---|---|---|
countryCode | {{countryCode}} | string (optional) |
userId | {{userId}} | string (optional) |
tenantId | {{tenantId}} | string (optional) |
Path Parameter
| Name | Type | Description |
|---|---|---|
id | string | The unique ID of the task request. |
Request Body
{
"samplerId": "string",
"description": "string",
"pickupAddress": "string",
"dueDate": "string",
"priority": "LOW"
}
Request Body Explanation
| Name | Type | Description |
|---|---|---|
samplerId | string | The unique ID of the sampler assigned to the task. |
description | string | A description of the task. |
pickupAddress | string | The address where the sampler should pick up the task materials. |
dueDate | string | The date by which the task is due (in ISO 8601 format). |
priority | string | The priority level of the task (LOW, MEDIUM, HIGH). |
Response: 200
{
"message": "Sampler assigned successfully.",
"taskId": "task123",
"samplerId": "sampler456",
"status": "ASSIGNED"
}
LANGUAGE
CURL REQUEST
curl --request PATCH \
--url /api/v1/task-requests/{id}/assign-sampler \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!